#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main()
{
    int n = 0; int sum = 0;
    scanf("%d", &n);
    for (int i = 2; i <= n; i++)
    {
        
           int flag = 1;
        
        for (int j = 2; j < i; j++)
        {
            if (i % j == 0)
            {
                flag = 0;
                break;
            }
        }
        if (flag == 1)
            sum++;
    }
    printf("%d ", sum);
    return 0;
}